﻿<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta property="og:site_name" content="test website"/>
<meta property="og:description" content="Compelling description of URL that is about 300 characters in length."/>
<meta property="og:image" content="YOURIMAGEURLGOESHERE.JPG">
<meta property="og:url" content="http://localhost/fbshare_zigya/index.php">
<meta property="og:type" content="blog"/>
<title>Untitled Document</title>

</head>
<script src="https://code.jquery.com/jquery-1.11.1.js"></script>
<script src="https://apis.google.com/js/platform.js" async defer></script>
<script src="//platform.linkedin.com/in.js" type="text/javascript"> lang: en_US</script>
<body>
hi this is a test<br>
<form action="" method="post">
<!--for facebook-->
facebook
<a id="fb_link" href="javascript:void(0);" onclick="fbs_click('${product.id}');">Share on FB</a>
<br>
<!--for twitter-->
twitter
<a href="javascript:void(0);" onClick="popupCenter('https://twitter.com/share','title','700','450','twitter');">Tweet</a>
<br>
<!--for google-->
google
<a title="share on google+" href="javascript:void(0);" onclick="return googleplusbtn('http://stackoverflow.com/questions/19867068/google-plus-does-not-show-the-thumbnail-when-i-share-my-websites-link')"><img src="http://bobbelderbos.com/wp-content/themes/bamboo/i/plus-icon.png" alt="Share on Google+" /></a> 

<br> 
linkdin
<!-- Place this tag where you want the +1 button to render. -->
<!--linkdin share-->
<a href="javascript:void(0);" onClick="popupCenter('https://www.linkedin.com/shareArticle?mini=true&url=http://localhost/fbshare_zigya/index.php&title=LinkedIn&summary=test&source=LinkedIn','test','700','450','linkdin');">ln</a>

<br>
blogger
<!--blogger share-->
<a href="javascript:void(0);" onClick="popupCenter('https://www.blogger.com/blog-this.g?u=http://blogname.blogspot.com/2014/03/watch-new-xmen-days-of-future-past.html&n=My%20Post%20Name&t=http://localhost/fbshare_zigya/index.php?','test','700','450','blogger')">bloger</a>
</form>
<script type="text/javascript">

function googleplusbtn(url) {
  share('goolgeplus');
  sharelink = "https://plus.google.com/share?url="+url;
  newwindow=window.open(sharelink,'name','height=400,width=600');
  if (window.focus) {newwindow.focus()}                                                                                                                                
  return false;
}   

function fbs_click(id) {
	share('facebook')
	var url = 'http://www.facebook.com/sharer.php?u=' +
    encodeURIComponent('http://zigya.com/');
	window.open(url, 'Share on FaceBook', 'left=20,top=20,width=550,height=400,toolbar=0,menubar=0,scrollbars=0,location=0,resizable=1');
	return false;
}

function popupCenter(url, title, w, h,webshare) {
  share(webshare);
  var left = (screen.width/2)-(w/2);
  var top = (screen.height/2)-(h/2);
  return window.open(url, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);
}
function share(share){
//	var site=share;
	$.ajax({
			type:"POST",
			url:'<?php echo base_url().BASE; ?>study/share_entry',		
			data:{'share':share},
			cache: false,
			success:function(test){
				alert(html);
			},
			 error:function(test){
			 alert('fail');
				 }
				});
}
</script>
</body>
</html>